package com.gec.yigou.pms.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import lombok.Data;

/**
 * 商品三级分类
 *
 * @author Hbian
 * @email 1427504222@qq.com
 * @date 2024-01-22 10:59:46
 */
@ApiModel
@Data
@TableName("pms_category")
public class CategoryEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 分类id
     */
    @TableId
    @ApiModelProperty(name = "catId", value = "分类id")
    private Long catId;
    /**
     * 分类名称
     */
    @ApiModelProperty(name = "name", value = "分类名称")
    private String name;
    /**
     * 父分类id
     */
    @ApiModelProperty(name = "parentCid", value = "父分类id")
    private Long parentCid;
    /**
     * 层级
     */
    @ApiModelProperty(name = "catLevel", value = "层级")
    private Integer catLevel;
    /**
     * 是否显示[0-不显示，1显示]
     */
    @ApiModelProperty(name = "showStatus", value = "是否显示[0-不显示，1显示]")
    @TableLogic(value = "1", delval = "0") //自定义配置  显示为1  删除为0
    private Integer showStatus;
    /**
     * 排序
     */
    @ApiModelProperty(name = "sort", value = "排序")
    private Integer sort;
    /**
     * 图标地址
     */
    @ApiModelProperty(name = "icon", value = "图标地址")
    private String icon;
    /**
     * 计量单位
     */
    @ApiModelProperty(name = "productUnit", value = "计量单位")
    private String productUnit;
    /**
     * 商品数量
     */
    @ApiModelProperty(name = "productCount", value = "商品数量")
    private Integer productCount;

    /**
     * 子分类 不是数据库表数据 添加
     *
     * @TableField(exist = false) 该属性在表中不存在
     */
    @TableField(exist = false)
    private List<CategoryEntity> children;

}
